package com.yaorange.nongit.service.impl;

import java.util.List;
import com.yaorange.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yaorange.nongit.mapper.NjtAdminPrinterseqMapper;
import com.yaorange.nongit.domain.NjtAdminPrinterseq;
import com.yaorange.nongit.service.INjtAdminPrinterseqService;

/**
 * 打印机序列号管理Service业务层处理
 * 
 * @author lzh
 * @date 2025-02-28
 */
@Service
public class NjtAdminPrinterseqServiceImpl implements INjtAdminPrinterseqService 
{
    @Autowired
    private NjtAdminPrinterseqMapper njtAdminPrinterseqMapper;

    /**
     * 查询打印机序列号管理
     * 
     * @param printerId 打印机序列号管理主键
     * @return 打印机序列号管理
     */
    @Override
    public NjtAdminPrinterseq selectNjtAdminPrinterseqByPrinterId(Long printerId)
    {
        return njtAdminPrinterseqMapper.selectNjtAdminPrinterseqByPrinterId(printerId);
    }

    /**
     * 查询打印机序列号管理列表
     * 
     * @param njtAdminPrinterseq 打印机序列号管理
     * @return 打印机序列号管理
     */
    @Override
    public List<NjtAdminPrinterseq> selectNjtAdminPrinterseqList(NjtAdminPrinterseq njtAdminPrinterseq)
    {
        return njtAdminPrinterseqMapper.selectNjtAdminPrinterseqList(njtAdminPrinterseq);
    }

    /**
     * 新增打印机序列号管理
     * 
     * @param njtAdminPrinterseq 打印机序列号管理
     * @return 结果
     */
    @Override
    public int insertNjtAdminPrinterseq(NjtAdminPrinterseq njtAdminPrinterseq)
    {
        njtAdminPrinterseq.setCreateTime(DateUtils.getNowDate());
        return njtAdminPrinterseqMapper.insertNjtAdminPrinterseq(njtAdminPrinterseq);
    }

    /**
     * 修改打印机序列号管理
     * 
     * @param njtAdminPrinterseq 打印机序列号管理
     * @return 结果
     */
    @Override
    public int updateNjtAdminPrinterseq(NjtAdminPrinterseq njtAdminPrinterseq)
    {
        return njtAdminPrinterseqMapper.updateNjtAdminPrinterseq(njtAdminPrinterseq);
    }

    /**
     * 批量删除打印机序列号管理
     * 
     * @param printerIds 需要删除的打印机序列号管理主键
     * @return 结果
     */
    @Override
    public int deleteNjtAdminPrinterseqByPrinterIds(Long[] printerIds)
    {
        return njtAdminPrinterseqMapper.deleteNjtAdminPrinterseqByPrinterIds(printerIds);
    }

    /**
     * 删除打印机序列号管理信息
     * 
     * @param printerId 打印机序列号管理主键
     * @return 结果
     */
    @Override
    public int deleteNjtAdminPrinterseqByPrinterId(Long printerId)
    {
        return njtAdminPrinterseqMapper.deleteNjtAdminPrinterseqByPrinterId(printerId);
    }
}
